﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WeatherPrediction;

namespace Weather_Prediction
{
    public partial class WebUserControlDayForeCast : System.Web.UI.UserControl
    {
        public void Page_Load(object sender, EventArgs e)
        {
            
        }

        public void fillContent(forecastOfOneday currForcast)
        {
            setTextOfLabels(currForcast.title, lbDay1Title);
            ImageRequest.setUrlImage(currForcast.icon_url, ImgDay1);
            setTextOfLabels(currForcast.icon, lbIcon);
            setTextOfLabels(currForcast.fcttext, lbFctText);

        }

        public void setTextOfLabels(string textToDisplay, Label labelToSet)
        {
            labelToSet.Text = textToDisplay;
        }

        public Panel pPanelContent
        {
            get
            {
                return PanelContent;
            }
            set
            {
                PanelContent = value;
            }
        }

    }
}